package IO;

import java.io.*;


/**
 * 写入的数据还在保存在缓冲器，fw.flush后文件中才会展示数据
 */
public class Test01 {
    public static void main(String[] args) throws IOException {
        /*FileWriter fw = new FileWriter("a.txt");
        fw.write("万息教育");*/

        /*ObjectOutputStream objectOutputStream = new ObjectOutputStream(new FileOutputStream("a.txt"));
        objectOutputStream.writeObject("1111");
        objectOutputStream.close();*/

        FileOutputStream outputStream = new FileOutputStream(new File("a.txt"));
        outputStream.write("1111".getBytes());
        outputStream.close();
    }
}
